#!/bin/bash

user=$(ps aux | grep xfce4-session | head -n 1 | awk '{print $1}')
# OSD="osd_cat -f -misc-fixed-medium-r-semicondensed--30-*-*-*-c-*-*-* -O 5 -d 1"

# show="$1"
# shift
cmd="$@"

# file=$(mktemp)
# chown $user:users $file
# echo "$@" > $file
# ( sleep 2 && rm $file ) &

# sudo -u $user /bin/sh -c "export DISPLAY=:0.0; $OSD $file & exec $cmd >/dev/null &" 

sudo -u $user /bin/sh -c "export DISPLAY=:0.0; exec $cmd >/dev/null &" 

